/*
============================================================================
 Name        : $(classname)Container.h
 Author	     : $(author)
 Copyright   : $(copyright)
 Description : Declares container control for application.
============================================================================
*/

#ifndef $(classname$upper)CONTAINER_H
#define $(classname$upper)CONTAINER_H

// INCLUDES
#include <coecntrl.h>
#include <aknlists.h> 
//#include <eiklbx.h> 

// FORWARD DECLARATIONS

// CLASS DECLARATION

/**
*  C$(classname)Container  container control class.
*  
*/
class C$(classname)Container : public CCoeControl, MCoeControlObserver
	{
	public: // Constructors and destructor
		enum TIconArrayIndex
			{
			EIconTotal
			};
		
		/**
		* EPOC default constructor.
		* @param aRect Frame rectangle for container.
		*/
		void ConstructL(const TRect& aRect);

		/**
		* Destructor.
		*/
		~C$(classname)Container();

	public: // New functions

    public: // Functions from base classes
		TKeyResponse  OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
#if defined(USE_BACKGOUND)
		TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
#endif // USE_BACKGOUND

	private: // Functions from base classes

	   /**
		* From CoeControl,SizeChanged.
		*/
		void SizeChanged();

	   /**
		* From CoeControl,CountComponentControls.
		*/
		TInt CountComponentControls() const;

	   /**
		* From CCoeControl,ComponentControl.
		*/
		CCoeControl* ComponentControl(TInt aIndex) const;

	   /**
		* From CCoeControl,Draw.
		*/
		void Draw(const TRect& aRect) const;

	   	
		/**
		* From MCoeControlObserver
		* Acts upon changes in the hosted control's state. 
		*
		* @param	aControl	The control changing its state
		* @param	aEventType	The type of control event 
		*/
		void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
		
	private:
		void CreateListBoxL();
		void SetListBoxIconArrayL(TInt aIconArrayResourceId);
		
	private: //data
		
		CAknColumnListBox*				iListBox;
#if defined(USE_BACKGOUND)
		MAknsControlContext*			iBackGround;
#endif // USE_BACKGOUND
	};

#endif


